<template>
  <div>
    <TitleSecondary title="失销原因" />
    <p-table
      class="table-list-container"
      row-key="id"
      :columns="columns"
      :data-source="dataSource"
      :pagination="false"
      bordered
    >
    </p-table>
  </div>
</template>

<script>
export default {
  props: {
    dataSource: {
      type: Array,
      default: () => [],
    },
  },
  data() {
    return {};
  },
  computed: {
    columns() {
      const columns = [
        {
          align: 'center',
          title: '失销类别',
          dataIndex: 'categoryName',
          sorter: true,
        },
        {
          align: 'center',
          title: '失销细类',
          dataIndex: 'itemName',
          ellipsis: true,
          sorter: true,
        },
        {
          align: 'center',
          title: '失销说明',
          dataIndex: 'remark',
          sorter: true,
          ellipsis: true,
        },
        {
          align: 'center',
          title: '失销人',
          dataIndex: 'createUserName',
          sorter: true,
          ellipsis: true,
        },
        {
          align: 'center',
          title: '失销人部门',
          dataIndex: 'createDeptName',
          sorter: true,
          ellipsis: true,
        },
        {
          align: 'center',
          title: '失销时间',
          dataIndex: 'createTime',
          sorter: true,
          ellipsis: true,
        },
      ];
      return columns;
    },
  },
  created() {},
  methods: {},
};
</script>

<style lang="less" scoped>
.table-list-container {
  margin-top: 20px;
  margin-bottom: 40px;
}
</style>
